import '../Order/Order.scss'
import './Noorder.scss'
import http from '../../../utils/http'
import Taro from '@tarojs/taro'
import React, { useEffect, useState } from 'react'
import { View, Text, Image, Button } from '@tarojs/components';
import { AtCurtain, AtButton } from 'taro-ui'
import src from '../../../static/images/yqhy.png'
const Noorder = () => {
  // 请求数据
  useEffect(() => {
    // 取出token
    let Gettoken = Taro.getStorageSync('token')
    // http({
    //   url: '/user/orderDetailsQuery',
    //   method: 'get',
    //   data: {
    //     orderId: 'xiaowang'
    //   },
    //   header: {
    //     'token': Gettoken
    //   }
    // }).then((res) => {
    //   console.log(res);
    // })
  }, [])


  //显示二维码
  const [isOpened, setisOpened] = useState(false)
  const onClose = (v) => {
    setisOpened(!isOpened)
  }


  return <View>
    {/* 头部 */}
    <View className='com_one'>
      <View className='group_name'>
        <Text>社区名称</Text>
      </View>
      <View className='com_msg'>
        <Text>提货点：鲜丰水果</Text> | <Text>电话：088-6666666</Text>
        {/* <Text className='at-icon at-icon-phone'></Text> */}
      </View>
    </View>
    {/* 地址 */}
    <View className='address'>
      <View className='address_right'>
        <View>
          <Text>提货地址：</Text>
          <Text>北京市XXXXXXX1-1-1</Text>
        </View>
        <View className='at-icon at-icon-map-pin'></View>
      </View>
      <View>
        <Text>提货时间：</Text>
        <Text>下单2小时后，请耐心等待商家备货</Text>
      </View>
      <View>
        <Text>订单编号：</Text>
        <Text>SQDS000000212</Text>
      </View>
    </View>
    {/* 信息 */}
    <View className='xinxi'>
      {/* 用户 */}
      <View>
        <View className='text'>提货人预留信息</View>
        <View className='userthe'>
          <Text>李浩</Text>
          <Text>1855555555</Text>
        </View>
      </View>

      <View>
        <View className='text'>拼团信息</View>
        <View className='informa'>
          <View>
            <Image src='/pingtuan_yonghu/src/static/images/tu.png' className='image'></Image>
          </View>
          <View>
            <View>
              <Text>精品泰国桂圆 1000g/盒</Text>
            </View>
            <View className='span'>
              <Text>￥7.8</Text>
              <Text>￥14.6</Text>
              <Text>每人限购1份</Text>
            </View>
          </View>
        </View>
      </View>

      <View className='members'>
        <View className='text'>
          拼团成员<Text className='spanB'>4 团</Text>
        </View>
        <View className='members_mem'>
          <View>
            <Image></Image>
            <Text>Lee （我）</Text>
          </View>
          <View>
            团了1份
          </View>
        </View>

        <View className='members_mem'>
          <View>
            <Image></Image>
            <Text>Lee （我）</Text>
          </View>
          <View>
            团了1份
          </View>
        </View>
        <View className='members_mem'>
          <View>
            <Image></Image>
            <Text>Lee （我）</Text>
          </View>
          <View>
            团了1份
          </View>
        </View>
        <View className='members_mem'>
          <View>
            <Image></Image>
            <Text>Lee （我）</Text>
          </View>
          <View>
            团了1份
          </View>
        </View>

      </View>

    </View>

    <View className='footer'>
      <View>
        {/* <Text>提货二维码</Text> */}
        <AtButton
          onClick={() => { setisOpened(true) }}>
          提货二维码
        </AtButton>
      </View>
      <View>
        {/* <Text>邀请好友拼团</Text> */}
        <AtButton
          onClick={() => { setisOpened(true) }}>
          邀请好友拼团
        </AtButton>
      </View>
    </View>
    <AtCurtain
      isOpened={isOpened}
      onClose={() => { onClose(false) }}
    >
      <Image
        style='width:100%;height:300px'
        src={src}
      />
    </AtCurtain>

  </View>

}

export default Noorder;